let obj = {
  name: '张三',
  age: 18,
  like: [
    'code',
    { x: 2 }
  ]
}

let { name, age, like: [, { x }] } = obj  //解构出x
console.log(x);
